import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '姓名',
    align:"center",
    dataIndex: 'realName'
   },
   {
    title: '性别',
    align:"center",
    dataIndex: 'gender_dictText'
   },
   {
    title: '头像',
    align:"center",
    dataIndex: 'personePhone',
    customRender:render.renderImage,
   },
   {
    title: '出生年月',
    align:"center",
    dataIndex: 'birthdate',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
   },
   {
    title: '最高学历',
    align:"center",
    dataIndex: 'education_dictText'
   },
   {
    title: '专业',
    align:"center",
    dataIndex: 'major'
   },
   {
    title: '毕业院校',
    align:"center",
    dataIndex: 'graduationSchool'
   },
   {
    title: '职称/头衔',
    align:"center",
    dataIndex: 'title'
   },
   {
    title: '专业领域',
    align:"center",
    dataIndex: 'expertiseField_dictText'
   },
   {
    title: '所属机构',
    align:"center",
    dataIndex: 'organization'
   },
   {
    title: '联系电话',
    align:"center",
    dataIndex: 'contactPhone'
   },
   {
    title: '电子邮箱',
    align:"center",
    dataIndex: 'contactEmail'
   },
   {
    title: '认证状态',
    align:"center",
    dataIndex: 'isVerified_dictText'
   },
   {
    title: '状态',
    align:"center",
    dataIndex: 'zjStatus_dictText'
   },
];

//子表表格配置

// 高级查询数据
export const superQuerySchema = {
  realName: {title: '姓名',order: 0,view: 'text', type: 'string',},
  gender: {title: '性别',order: 1,view: 'radio', type: 'string',dictCode: 'sex',},
  personePhone: {title: '头像',order: 2,view: 'image', type: 'string',},
  birthdate: {title: '出生年月',order: 3,view: 'date', type: 'string',},
  education: {title: '最高学历',order: 4,view: 'list', type: 'string',dictCode: 'expert_xueli',},
  major: {title: '专业',order: 5,view: 'text', type: 'string',},
  graduationSchool: {title: '毕业院校',order: 6,view: 'text', type: 'string',},
  title: {title: '职称/头衔',order: 7,view: 'text', type: 'string',},
  expertiseField: {title: '专业领域',order: 8,view: 'sel_tree', type: 'string',dict: 'cms_domain_type,type_name,id', pidValue: '0',},
  organization: {title: '所属机构',order: 9,view: 'text', type: 'string',},
  contactPhone: {title: '联系电话',order: 10,view: 'text', type: 'string',},
  contactEmail: {title: '电子邮箱',order: 11,view: 'text', type: 'string',},
  isVerified: {title: '认证状态',order: 12,view: 'radio', type: 'string',dictCode: 'expert_renz_status',},
  zjStatus: {title: '状态',order: 13,view: 'radio', type: 'string',dictCode: 'expert_status',},
  //子表高级查询
  jkExpertWork: {
    title: '专家工作经历',
    view: 'table',
    fields: {
    }
  },
  jkExpertAcademic: {
    title: '专家学术成果',
    view: 'table',
    fields: {
        academic: {title: '学术成果',order: 0,view: 'umeditor', type: 'string',},
    }
  },
  jkExpertProfile: {
    title: '专家个人简介',
    view: 'table',
    fields: {
        profile: {title: '个人简介',order: 0,view: 'umeditor', type: 'string',},
    }
  },
};
